A three-dimensional calculator powered by QuickDraw¬ 3D
Jade╒s End Software
⌐ Copyright 1996 John David N. Dionisio
dondi@cs.ucla.edu
About Calc^3
Calc^3 (pronounced ╥calc cubed╙) is a calculator that works in the third dimension. Thanks to Apple╒s QuickDraw¬ 3D technology, the calculators that Calc^3 displays in its windows are fully interactive three-dimensional objects that you can rotate, zoom into or out of, and otherwise manipulate in full 3D space. Standard 3DMF (3-dimensional metafile format) models can also be exported from Calc^3 and then imported into other QuickDraw¬ 3D-savvy applications. The user can choose between a simple, flat-shaded calculator, or a fully texture-mapped version.
Calc^3 is a module in a suite of three-dimensional applications collectively called Cubicle. Cubicle is a set of fully three-dimensional, interactive desk accessories. Other already-released modules are Clock^3, a three-dimensional clock, and Eyes^3, a three-dimensional eyes program. Watch out for additional QuickDraw¬ 3D-savvy Cubicle programs from this developer.
Because Calc^3 uses Apple╒s QuickDraw¬ 3D technology, it requires a Power Macintosh with at least 16M of RAM. Needless to say, QuickDraw¬ 3D must also be installed in your system.
As QuickDraw¬ 3D is a relatively new technology, the 3D routines which Calc^3 depends on may themselves have bugs. In particular, memory management in QuickDraw¬ 3D may still have occasional leaks and glitches. In these cases, please download the latest version of QuickDraw¬ 3D whenever it becomes available. At this writing, the latest version is 1.0.6.
System Requirements
Calc^3 requires a Power Macintosh with QuickDraw¬ 3D version 1.0.3 or higher and at least 16 megabytes of total memory. It has been explicitly tested on the following systems: Power Macintosh 8500/120 with 32 megabytes of memory and System 7.5.3 and PowerBook 5300/100 with 16 megabytes of memory and System 7.5.3.
User Guide
Calc^3 (pronounced ╥calc cubed╙) opens windows that display either a simple, flat-shaded calculator or a sophisticated-looking, texture-mapped version. The following paragraphs summarize the various controls, commands, and options in Calc^3. Calc^3 also has extensive balloon help, so you can get most of the information below (except for the keyboard shortcuts) by choosing ╥Show Balloons╙ from the Help menu.
Window Controls
A clock window in Calc^3 has the following controls and functions:
Close box: Dismisses the calculator window.
Zoom box: Toggles between the standard calculator size (full screen) and the user-defined size, as set by the Resize box.
Resize box: Resizes the calculator window. Note that when a calculator window changes size, the 3D calculator within the window also scales itself accordingly.
3D manipulation: Click and drag within the window area to rotate the calculator; certain modifier keys (see below) can change this so that instead of rotating, you are either moving or scaling the calculator.
Keyboard Shortcuts
The following keyboard shortcuts can be used within a calculator window. To use them, hold down the specified keys while dragging the mouse within the calculator window.
scale instead of rotate control key
move instead of rotate shift key
Calculator functions may also be invoked using the keyboard. If your computer has a numeric keypad, those keys correspond directly to the buttons of the three-dimensional calculator. The num lock/clear key invokes the Clear (C) function when pressed by itself and invokes the All Clear (AC) function when pressed with the shift key held down. If you do not have a numeric keypad, the number keys may be used, and the C key may be used to trigger the Clear function.
Calc^3 also provides a Sign Change function, made available by holding down the shift key while pressing the minus (-) key, either on the keyboard or the three-dimensional calculator. To show that Sign Change has been activated, a small minus sign appears in the calculator display.
Menu Commands
The following functions are available via menu commands:
File Menu
New: Opens a new calculator window. The calculator that is opened follows the default preferences specified by the user (see Calc^3 Preferences below).
Close: Closes the frontmost calculator window.
Export╔: Exports the current calculator to a standard 3DMF model. If a file with that name already exists, you will be asked if you want to replace it.
Quit: Quits from Calc^3.
Edit Menu
Undo: Disabled, because this operation is not present in Calc^3.
Cut: When a dialog box with text fields is active, moves the selection in the current text field onto the clipboard, thus deleting that selection from the text field.
Copy: Copies the current content of the frontmost calculator window (or the selection in a dialog box with text fields) onto the clipboard. The content of the calculator window (or text field) itself is unchanged. The copied content includes the calculator╒s 3D model, a rendered 2D picture of it, and the number that is currently displayed on the calculator.
Paste: Copies the current content of the clipboard onto an active dialog box with text fields. The clipboard is expected to contain TEXT data copied either from Calc^3 or another application. When text is pasted into a calculator window, the calculator behaves as if the keys corresponding to the text have been pressed (i.e. ╥5+9=╙ displays the number 14 in the calculator). Characters that do not correspond to any calculator commands are ignored.
Select All: When a dialog box with text fields is active, selects the entire content of the text field that currently contains the insertion point.
Preferences╔: Displays the Calc^3 Preferences dialog box. See below for an explanation of the Calc^3 Preferences dialog box.
The Calc^3 Preferences Dialog Box
This section explains the options available in the Calc^3 Preferences dialog box. A preview window within the dialog box gives you constant feedback on the calculator specified by the current preferences. If a calculator window is active at the time that the dialog box is opened, these preferences will affect the setup in that window. If no calculator windows are open, then the preferences dialog box affects the overall Calc^3 defaults. Alternatively, you can set the Calc^3 defaults at any time by clicking on the Make Default button (see below).
Factory Reset: Click this button to set the preferences to Calc^3╒s internal defaults ╤ that is, the preferences used by Calc^3 when running it for the first time.
Smooth Button Presses: Check this box to choose the quality of the calculator╒s 3D button animation. When checked, calculator buttons are pressed with a smoother motion. Because it lengthens the amount of time required to animate a button-press considerably, this option is only recommended for faster machines (but you are free to try it out anyway, just to see how it looks).
Calculator Click Sounds: Check this box to choose whether or not the calculator╒s buttons produce an audible click when pressed.
Display Color╔: Click this button to choose the color of the calculator╒s display screen.
Background Color╔: Click this button to choose the color of the background area of the scene.
Use Texture Mapping: Check this box to choose how the calculator is rendered. When on, Calc^3 uses the system╒s Utilities Pattern (set using the Desktop Patterns control panel with the option key held down) to paint the calculator╒s body, and uses custom textures to paint the calculator╒s buttons. If Use Texture Mapping is turned off, solid colors are used to render the calculator.
In general, the 3D calculator looks more realistic when Use Texture Mapping is checked, but because the computer has to work harder to render the calculator, Calc^3╒s performance is a little slower when using this option.
Color Options When Use Texture Mapping is Turned Off
These buttons are active only if the Use Texture Mapping check box is unchecked.
Body Color╔: Check this button to choose the color of the calculator╒s body.
Button Color╔: Check this button to choose the color of the calculator╒s buttons.
Button Label Color╔: Check this button to choose the color of the calculator╒s button╒s labels.
Lighting
Use this section to set up the lighting environment for your three-dimensional calculator. At the top of the Lighting section is an entry field with a nudge control. Use this field to set the brightness of your lights. Valid brightness ranges from 0.0 to 1.0.
Light Color╔: Click this button to choose the color of the lighting for the calculator scene.
The buttons at the bottom of the dialog box either set or cancel the current set of preferences.
Make Default: Click this button to save the current preferences as the overall Calc^3 default. Note that this button is disabled when you invoke the preferences when no calculator windows are open, because at that point the preferences always affect the default settings.
Cancel: Click this button to get out of the preferences dialog box while leaving the active calculator window (or the Calc^3 defaults) untouched.
OK: Click this button to set your current preferences, either into the active calculator window or the Calc^3 defaults (depending on whether or not a calculator window is currently open). Calc^3 will dim this button for you if it senses that the current set of preferences is exactly the same as the original set.
Known Problems and Cautions
Calc^3 was created more as a QuickDraw¬ 3D showcase than as a fully-functional calculator. Thus, it possesses a number of deficiencies related to its calculator capabilities:
Ñ Calculations over very high-precision numbers (i.e. numbers with at least 10 significant digits) are not handled very well by Calc^3. Specifically, these numbers are sometimes rounded or truncated incorrectly, and may occasionally display incorrect decimal points.
Ñ Error and overflow conditions are not handled well by Calc^3. For example, the notorious ╥division-by-zero╙ error is simply ignored by Calc^3 within issuing any messages to the user. Calculations that exceed the capacity of the calculator (overflows and underflows) are also not reported properly, and result in roundings, truncations, or misplaced decimal points.
The problems described below relate to the three-dimensional aspect of Calc^3:
Ñ The 3D model that describes Calc^3╒s calculator takes up a considerable amount of memory. Thus, be careful when you Copy the calculator into the clipboard ╤ as long as the calculator╒s model is in the Clipboard, you may encounter ╥Low memory╙ or ╥Out of memory╙ errors later on, even if you have already quit from Calc^3. If you encounter this situation, copy something small into the Clipboard (i.e. a Finder icon, a short segment of text, etc.).
Ñ Be careful with keeping many calculator windows open at once; make sure that your system configuration (i.e. amount of available RAM) can handle the number of simultaneously open calculators. As a very small developer with limited resources, I cannot guarantee all memory-related errors are handled elegantly. At the very least, I can say with confidence that most of these errors occur in high memory demand situations, i.e. sufficiently many open calculators. So please be careful when your Calc^3 usage falls into this category.
If you do encounter a low-memory condition (Calc^3 will sometimes catch it for you without crashing), I recommend that you quit immediately, then avoid that situation later on. This may involve limiting yourself limiting the number of Calc^3 windows open at once.
Credits
In what may become a common thread in most of my software, many thanks go to Chris Larson for much technical and religious guidance. May you find fulfillment in the latest transition in your professional life╔good luck in showing ╒em that the Mac makes for a better game machine!
Legal & Contact Information
Calc^3 is volunteerware ╤ that is, you are free to provide any kind of positive reinforcement to the programmer (grin) if you like his software. But seriously, at the very least, I would very much appreciate a short e-mail message if you like Calc^3 and have decided to use it for yourself. This at least gives me an idea of how it is being received out there.
I give my permission to include Calc^3 in any freeware or shareware CD. However, please inform me of your intention, so that I can keep track of which CDs contain my software.
Please direct all correspondence concerning Calc^3 to: dondi@cs.ucla.edu. Enjoy!